import network from '@/utils/network'
import baseUrl from './baseUrl'
const BASE_URL = baseUrl + '/ReleaseOrder'

export default {
  getPageList(data) {
    return network.request({
      url: BASE_URL + '/GetPageList',
      method: 'post',
      data
    })
  },
  getDetail(id) {
    return network.request({
      url: BASE_URL + '/GetDetail',
      method: 'get',
      params: {
        id
      }
    })
  },
  syncReleaseOrderToEs(data) {
    return network.request({
      url: BASE_URL + '/SyncReleaseOrderToEs',
      method: 'post',
      data
    })
  },
  checkExistByName(name, id) {
    return network.request({
      url: BASE_URL + '/CheckExistByName',
      method: 'get',
      params: {
        name, id
      }
    })
  },
  sendReleaseOrderEmails(data) {
    return network.request({
      url: BASE_URL + '/SendReleaseOrderEmails',
      method: 'post',
      data
    })
  }
}